<?php /* Smarty version 2.6.26, created on 2010-04-27 20:06:24
         compiled from index.tpl */ ?>
<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => 'header.tpl', 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>
   
  <div class="center-column">
    <ul id="sidebar">
            <li>
        <h2>In the Office</h2>
        <?php if ($this->_tpl_vars['whos_in_office']): ?>
        <p><?php echo $this->_tpl_vars['whos_in_office']; ?>
</p>
        <?php else: ?>
        <p>Nobody</p>
        <?php endif; ?>          
      </li>
      <li>
        <h2>On Deck</h2>
        <?php if ($this->_tpl_vars['next_shift']): ?>
        <p><?php echo $this->_tpl_vars['next_shift']; ?>
</p>
        <?php else: ?>
        <p>Nobody</p>
        <?php endif; ?>
      </li>
      
      <?php if ($this->_tpl_vars['user_next']): ?>
      <li>
        <h2>Your Next</h2>
        <p><?php echo $this->_tpl_vars['user_next']; ?>
</p>
      </li>
      <?php endif; ?>
      <li>
        <h2>Open Shifts</h2>
        <?php if ($this->_tpl_vars['next_open']): ?>
        <?php unset($this->_sections['a_loop']);
$this->_sections['a_loop']['name'] = 'a_loop';
$this->_sections['a_loop']['loop'] = is_array($_loop=$this->_tpl_vars['next_open']) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$this->_sections['a_loop']['show'] = true;
$this->_sections['a_loop']['max'] = $this->_sections['a_loop']['loop'];
$this->_sections['a_loop']['step'] = 1;
$this->_sections['a_loop']['start'] = $this->_sections['a_loop']['step'] > 0 ? 0 : $this->_sections['a_loop']['loop']-1;
if ($this->_sections['a_loop']['show']) {
    $this->_sections['a_loop']['total'] = $this->_sections['a_loop']['loop'];
    if ($this->_sections['a_loop']['total'] == 0)
        $this->_sections['a_loop']['show'] = false;
} else
    $this->_sections['a_loop']['total'] = 0;
if ($this->_sections['a_loop']['show']):

            for ($this->_sections['a_loop']['index'] = $this->_sections['a_loop']['start'], $this->_sections['a_loop']['iteration'] = 1;
                 $this->_sections['a_loop']['iteration'] <= $this->_sections['a_loop']['total'];
                 $this->_sections['a_loop']['index'] += $this->_sections['a_loop']['step'], $this->_sections['a_loop']['iteration']++):
$this->_sections['a_loop']['rownum'] = $this->_sections['a_loop']['iteration'];
$this->_sections['a_loop']['index_prev'] = $this->_sections['a_loop']['index'] - $this->_sections['a_loop']['step'];
$this->_sections['a_loop']['index_next'] = $this->_sections['a_loop']['index'] + $this->_sections['a_loop']['step'];
$this->_sections['a_loop']['first']      = ($this->_sections['a_loop']['iteration'] == 1);
$this->_sections['a_loop']['last']       = ($this->_sections['a_loop']['iteration'] == $this->_sections['a_loop']['total']);
?>
        <p><?php echo $this->_tpl_vars['next_open'][$this->_sections['a_loop']['index']]; ?>
</p>
        <?php endfor; endif; ?>
        <?php else: ?>
        <p>None</p>
        <?php endif; ?>
      </li>
    </ul>
    
    <div id="primary">
      <form action="qa-search.php" id="search-form" method="POST">
        <fieldset>
          <input type="text" class="default-text-input mid-text-input" name="q" id="q" value="Question and Answer Search" autocomplete="off" />
          <input type="submit" class="default-button" id="search-button" value="Search" />
        </fieldset>
      </form>
      
      <form action="add-question.php" id="add-question" method="POST">
        <h2>Add a New Question</h2>
        <fieldset class="stacked-fields">
          <input type="text" class="default-text-input" name="question" id="question" value="Question" autocomplete="off" />
          <input type="text" class="default-text-input" name="answer" id="answer" value="Answer" autocomplete="off" />
          <input type="text" class="default-text-input" name="qa-source" id="qa-source" value="Source" autocomplete="off" />
          <input type="hidden" id="newest_qa_id" value="<?php echo $this->_tpl_vars['newest_qa_id']; ?>
" />
          <input type="submit" class="default-button" id="add-qa-button" value="Add" />         
        </fieldset>
      </form>
      
      <ul id="timeline">
        <h2>Recent Questions</h2>
        <?php echo $this->_tpl_vars['qas']; ?>

      </ul>
    </div>
  </div>
    
<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => 'footer.tpl', 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>